[#include "../../../common/html.ftl" /]
[@html]
    [@head title="操作日志详细" css=["fw", "jsonview"] /]
    [@body class="white-bg"]
        <div class="wrapper wrapper-content animated fadeInRight ibox-content">
            <form class="form-horizontal m-t" id="signupForm">
                <div class="form-group">
                    <label class="col-sm-2 control-label">操作模块：</label>
                    <div class="form-control-static"
                         th:text="${TOperLog.title} + ' / ' + ${@dict.getLabel('sys_oper_type',TOperLog.businessType)}">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">登录信息：</label>
                    <div class="form-control-static"
                         th:text="${TOperLog.operName} + ' / ' + ${TOperLog.deptName} + ' / ' + ${TOperLog.operIp}+ ' / ' + ${TOperLog.operLocation}">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">请求地址：</label>
                    <div class="form-control-static" th:text="${TOperLog.operUrl}">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">请求方式：</label>
                    <div class="form-control-static" th:text="${TOperLog.requestMethod}">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">操作方法：</label>
                    <div class="form-control-static" th:text="${TOperLog.method}">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">请求参数：</label>
                    <div class="form-control-static">
                        <pre id="operParam"></pre>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">返回参数：</label>
                    <div class="form-control-static">
                        <pre id="jsonResult"></pre>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">状态：</label>
                    <div class="form-control-static"
                         th:class="${TOperLog.status == 0 ? 'label label-primary' : 'label label-danger'}"
                         th:text="${TOperLog.status == 0 ? '正常' : '异常'}">
                    </div>
                </div>
                <div class="form-group" th:style="'display:' + ${TOperLog.status == 0 ? 'none' : 'block'}">
                    <label class="col-sm-2 control-label">异常信息：</label>
                    <div class="form-control-static" th:text="${TOperLog.errorMsg}">
                    </div>
                </div>
            </form>
        </div>
        [@script js=["fw", "jsonview"]]
            <script type="text/javascript">
            $(function () {
                var operParam = [[${TOperLog.operParam}]];
                if ($.common.isNotEmpty(operParam) && operParam.length < 2000) {
                    $("#operParam").JSONView(operParam);
                } else {
                    $("#operParam").text(operParam);
                }
                var jsonResult = [[${TOperLog.jsonResult}]];
                if ($.common.isNotEmpty(jsonResult) && jsonResult.length < 2000) {
                    $("#jsonResult").JSONView(jsonResult);
                } else {
                    $("#jsonResult").text(jsonResult);
                }
            });
        </script>
        [/@script]
    [/@body]
[/@html]